const int Value_Goldnugget = 50;
const int Value_WhitePearl = 120;
const int Value_Addon_Joint_01 = 60;
const int VALUE_ADDON_JOINT_02 = 80;
const int VALUE_ADDON_JOINT_03 = 100;
var int bonus_joint_02;
var int bonus_joint_03;
 
instance ItMi_GoldNugget_Addon(C_Item)
{
	name = "Goldbrocken";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = Value_Goldnugget;
	visual = "ItMi_GoldNugget_01.3ds";
	material = MAT_STONE;
	description = name;
	text[5] = NAME_Value;
	count[5] = value;
	inv_zbias = INVCAM_ENTF_MISC2_STANDARD;
};
 
instance ItMi_Addon_WhitePearl(C_Item)
{
	name = "Perle";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = Value_WhitePearl;
	visual = "ItMi_WhitePearl_01.3ds";
	material = MAT_STONE;
	description = name;
	text[5] = NAME_Value;
	count[5] = value;
	inv_zbias = INVCAM_ENTF_MISC_STANDARD;
};
 
instance ItMi_Addon_Joint_01(C_Item)
{
	name = "Gruner Novize";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = Value_Addon_Joint_01;
	visual = "ItMi_Joint_US.3ds";
	material = MAT_LEATHER;
	scemeName = "JOINT";
	on_state[0] = Use_Addon_Joint_01;
	description = name;
	text[5] = NAME_Value;
	count[5] = value;
	inv_zbias = INVCAM_ENTF_RING_STANDARD;
};
 
instance ITMI_SPECIALJOINT(C_Item)
{
	name = "praparierter Traumruf";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI || ITEM_MISSION;
	value = Value_Addon_Joint_01 * 10;
	visual = "ItMi_Joint_01.3ds";
	material = MAT_LEATHER;
	scemeName = "JOINT";
	on_state[0] = usespecialjoint;
	description = name;
	text[0] = "Dieser hat eine starkere Wirkung";
	text[1] = "als ublich.";
	text[3] = "Geschenk fur den Guru Parvez.";
	text[5] = NAME_Value;
	count[5] = value;
	inv_zbias = INVCAM_ENTF_RING_STANDARD;
};
 
instance ITMI_JOINT_02(C_Item)
{
	name = "Schwarzer Weiser";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = VALUE_ADDON_JOINT_02;
	visual = "ItMi_Joint_US.3ds";
	material = MAT_LEATHER;
	scemeName = "JOINT";
	on_state[0] = use_itmi_joint_02;
	description = name;
	text[5] = NAME_Value;
	count[5] = value;
	inv_zbias = INVCAM_ENTF_RING_STANDARD;
};
 
instance ITMI_JOINT_03(C_Item)
{
	name = "Traumruf";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = VALUE_ADDON_JOINT_03;
	visual = "ItMi_Joint_GER.3ds";
	material = MAT_LEATHER;
	scemeName = "JOINT";
	on_state[0] = use_itmi_joint_03;
	description = name;
	text[5] = NAME_Value;
	count[5] = value;
	inv_zbias = INVCAM_ENTF_RING_STANDARD;
};
 
 
var int FirstJoint;
 
func void Use_Addon_Joint_01()
{
	if(Npc_IsPlayer(self))
	{
		if(FirstJoint == FALSE)
		{
			FirstJoint = TRUE;
			B_GivePlayerXP(50);
		};
		Wld_PlayEffect("SLOW_TIME",self,self,0,0,0,FALSE);
	};
};
 
func void use_itmi_joint_02()
{
	if(Npc_IsPlayer(self))
	{
		Wld_PlayEffect("SLOW_TIME",self,self,0,0,0,FALSE);
	};
	if((SECONDJOINT == FALSE) && Npc_IsPlayer(self))
	{
		B_GivePlayerXP(100);
		SECONDJOINT = TRUE;
	};
	BONUS_JOINT_02 += 1;
	if(BONUS_JOINT_02 >= 25)
	{
		B_RaiseAttribute(self,ATR_MANA_MAX,1);
		Npc_ChangeAttribute(self,ATR_MANA,1);
		AI_StartState(self,ZS_MagicSleep,1,"");
		BONUS_JOINT_02 = 0;
	};
};
 
func void use_itmi_joint_03()
{
	if(Npc_IsPlayer(self))
	{
		Wld_PlayEffect("SLOW_TIME",self,self,0,0,0,FALSE);
	};
	if((THIRDJOINT == FALSE) && Npc_IsPlayer(self))
	{
		B_GivePlayerXP(250);
		THIRDJOINT = TRUE;
	};
	BONUS_JOINT_03 += 1;
	if(BONUS_JOINT_03 >= 25)
	{
		B_RaiseAttribute(self,ATR_MANA_MAX,3);
		Npc_ChangeAttribute(self,ATR_MANA,3);
		AI_StartState(self,ZS_MagicSleep,1,"");
		BONUS_JOINT_03 = 0;
	};
};
 
func void usespecialjoint()
{
	AI_StartState(self,ZS_MagicSleep,1,"");
};
 
 
instance ItMi_BaltramPaket(C_Item)
{
	name = "Baltrams Lieferung";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MISSION;
	value = 200;
	visual = "ItMi_Packet.3ds";
	material = MAT_LEATHER;
	description = name;
	text[2] = "Ein schweres Paket";
	text[3] = "voller guter Sachen";
	text[4] = "vom Bauern Akil";
};
 
instance ItMi_Packet_Baltram4Skip_Addon(C_Item)
{
	name = "Paket fur Skip";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MISSION;
	value = 200;
	visual = "ItMi_Packet.3ds";
	material = MAT_LEATHER;
	description = name;
	text[2] = "Dieses schwere Paket";
	text[3] = "voller guter Sachen";
	text[4] = "ist fur den Piraten Skip bestimmt";
};
 
instance ItMi_BromorsGeld_Addon(C_Item)
{
	name = "Bromors Goldene Schale";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI | ITEM_MISSION;
	value = Value_Nugget;
	visual = "ItMi_GoldChalice.3DS";
	material = MAT_METAL;
	description = name;
	text[2] = "Der Name 'Bromor' ist mit";
	text[3] = "einem scharfen Gegenstand in den";
	text[4] = "Boden der Schale geritzt worden.";
	text[5] = NAME_Value;
	count[5] = value;
};
 
instance ItSe_ADDON_CavalornsBeutel(C_Item)
{
	name = "Cavalorns Lederbeutel";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI | ITEM_MISSION;
	value = Value_Nugget;
	visual = "ItMi_Pocket.3ds";
	scemeName = "MAPSEALED";
	material = MAT_LEATHER;
	on_state[0] = Use_CavalornsBeutel;
	description = name;
	text[0] = "";
	text[1] = "Am Bund hangt ein Schild";
	text[2] = "mit dem Namen 'Cavalorn'";
	text[3] = "Ein Brocken Erz befindet sich darin";
	text[4] = "";
	text[5] = NAME_Value;
	count[5] = value;
};
 
 
func void Use_CavalornsBeutel()
{
	CreateInvItems(hero,ItMi_Nugget,1);
	Print(PRINT_FoundOreNugget);
	SC_OpenedCavalornsBeutel = TRUE;
	Log_CreateTopic(TOPIC_Addon_CavalornTheHut,LOG_MISSION);
	Log_SetTopicStatus(TOPIC_Addon_CavalornTheHut,LOG_Running);
	B_LogEntry(TOPIC_Addon_CavalornTheHut,"Bei Cavalorns Hutte im Minental habe ich einen Beutel mit einem Erzbrocken gefunden. Cavalorn, der alte Gauner, hat ihn hier bestimmt vergessen.");
};
 
 
instance ItMi_Skull(C_Item)
{
	name = "Schadel";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MISSION;
	value = 10;
	visual = "DT_SKELETON_V01_HEAD.3ds";
	material = MAT_LEATHER;
	description = name;
};
 
instance ItMi_IECello(C_Item)
{
	name = "Cello";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = 1;
	visual = "Itmi_IE_Cello.3ds";
	material = MAT_WOOD;
	scemeName = "CELLO";
	on_state[0] = Use_Cello;
	description = name;
};
 
 
func void Use_Cello()
{
};
 
 
instance ItMi_IECelloBow(C_Item)
{
	name = "CelloBow";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = 1;
	visual = "Itmi_IE_CelloBow.3ds";
	material = MAT_WOOD;
	description = name;
};
 
instance ItMi_IEDrum(C_Item)
{
	name = "Drum";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = 1;
	visual = "ItMi_IE_Drum.3ds";
	material = MAT_WOOD;
	scemeName = "PAUKE";
	on_state[0] = Use_Drum;
	description = name;
};
 
 
func void Use_Drum()
{
};
 
 
instance ItMi_IEDrumScheit(C_Item)
{
	name = "Drumscheit";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = 1;
	visual = "Itmi_IE_Drumscheit.3ds";
	material = MAT_WOOD;
	scemeName = "DRUMSCHEIT";
	on_state[0] = Use_Drumscheit;
	description = name;
};
 
 
func void Use_Drumscheit()
{
};
 
 
instance ItMi_IEDrumStick(C_Item)
{
	name = "DrumStick";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = 1;
	visual = "Itmi_IE_DrumStick.3ds";
	material = MAT_WOOD;
	description = name;
};
 
instance ItMi_IEDudelBlau(C_Item)
{
	name = "Blauer Dudelsack";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = 1;
	visual = "Itmi_IE_DudelBlau.3ds";
	material = MAT_WOOD;
	scemeName = "DUDEL";
	on_state[0] = Use_Dudel;
	description = name;
};
 
 
func void Use_Dudel()
{
};
 
 
instance ItMi_IEDudelGelb(C_Item)
{
	name = "Gelber Dudelsack";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = 1;
	visual = "Itmi_IE_DudelGelb.3ds";
	material = MAT_WOOD;
	scemeName = "DUDEL";
	on_state[0] = Use_Dudel;
	description = name;
};
 
instance ItMi_IEHarfe(C_Item)
{
	name = "Harfe";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = 1;
	visual = "Itmi_IE_Harfe.3ds";
	material = MAT_WOOD;
	scemeName = "HARFE";
	on_state[0] = Use_Harfe;
	description = name;
};
 
 
func void Use_Harfe()
{
};
 
 
instance ItMi_IELaute(C_Item)
{
	name = "Laute";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MULTI;
	value = 1;
	visual = "Itmi_IE_Laute.3ds";
	material = MAT_WOOD;
	scemeName = "IELAUTE";
	on_state[0] = Use_Laute;
	description = name;
};
 
 
func void Use_Laute()
{
};
 
 
instance ItMi_Addon_Lennar_Paket(C_Item)
{
	name = "Klimperndes Paket";
	mainflag = ITEM_KAT_NONE;
	flags = ITEM_MISSION;
	value = 300;
	visual = "ItMi_Packet.3ds";
	scemeName = "MAPSEALED";
	on_state[0] = Use_LennarPaket;
	material = MAT_LEATHER;
	description = name;
	text[2] = "Da sind Dietriche drin";
	text[3] = "";
	text[4] = "Viele Dietriche";
	text[5] = NAME_Value;
	count[5] = value;
};
 
 
func void Use_LennarPaket()
{
	B_PlayerFindItem(ItKE_lockpick,Lennar_picklock_amount);
	Snd_Play("Geldbeutel");
	LennarPaket_Open = TRUE;
};
 
 
instance ItMi_Zeitspalt_Addon(C_Item)
{
	name = "Schwarzes Erz";
	mainflag = ITEM_KAT_POTIONS;
	flags = ITEM_MULTI;
	value = 0;
	visual = "ItMi_Zeitspalt_Addon.3DS";
	scemeName = "MAPSEALED";
	on_state[0] = Use_Zeitspalt_Addon;
	material = MAT_STONE;
	wear = WEAR_EFFECT;
	effect = "SPELLFX_WEAKGLIMMER";
	description = name;
	text[3] = "Wirkung unbekannt";
	inv_zbias = INVCAM_ENTF_MISC_STANDARD;
};
 
 
func void Use_Zeitspalt_Addon()
{
	if(Npc_IsPlayer(self))
	{
		Wld_PlayEffect("spellFX_BELIARSRAGE",self,self,0,0,0,FALSE);
		Wld_StopEffect("SLOW_MOTION");
		Wld_PlayEffect("SLOW_MOTION",self,self,0,0,0,FALSE);
	};
};